package com.kycq.viewpager.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class BasicFragment extends Fragment {
	private String TAG;

	public BasicFragment() {
		TAG = getClass().getSimpleName();
	}

	@Override
	public void onAttach(Context context) {
		super.onAttach(context);
		System.out.println(TAG + " onAttach");
	}

	@Override
	public void onCreate(@Nullable Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		System.out.println(TAG + " onCreate " + savedInstanceState);
	}

	@Nullable
	@Override
	public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		System.out.println(TAG + " onCreateView " + savedInstanceState);
		return super.onCreateView(inflater, container, savedInstanceState);
	}

	@Override
	public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
		super.onViewCreated(view, savedInstanceState);
		System.out.println(TAG + " onViewCreated");
	}

	@Override
	public void onActivityCreated(@Nullable Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		System.out.println(TAG + " onActivityCreated " + savedInstanceState);
	}

	@Override
	public void onStart() {
		super.onStart();
		System.out.println(TAG + " onStart");
	}

	@Override
	public void onResume() {
		super.onResume();
		System.out.println(TAG + " onResume");
	}

	@Override
	public void onViewStateRestored(@Nullable Bundle savedInstanceState) {
		super.onViewStateRestored(savedInstanceState);
		System.out.println(TAG + " onViewStateRestored " + savedInstanceState);
	}

	@Override
	public void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		System.out.println(TAG + " onSaveInstanceState " + outState);
	}

	@Override
	public void onPause() {
		super.onPause();
		System.out.println(TAG + " onPause");
	}

	@Override
	public void onStop() {
		super.onStop();
		System.out.println(TAG + " onStop");
	}

	@Override
	public void onDestroyView() {
		super.onDestroyView();
		System.out.println(TAG + " onDestroyView");
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
		System.out.println(TAG + " onDestroy");
	}

	@Override
	public void onDetach() {
		super.onDetach();
		System.out.println(TAG + " onDetach");
	}

	@Override
	public void onHiddenChanged(boolean hidden) {
		super.onHiddenChanged(hidden);
		System.out.println(TAG + " onHiddenChanged");
	}

	@Override
	public void setUserVisibleHint(boolean isVisibleToUser) {
		super.setUserVisibleHint(isVisibleToUser);
		System.out.println(TAG + " setUserVisibleHint " + isVisibleToUser);
	}

}
